﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace HamcoWcs.Entitys.UserInfos
{
    public class UserInfoConfig : IEntityTypeConfiguration<UserInfo>
    {
        public void Configure(EntityTypeBuilder<UserInfo> builder)
        {
            builder.HasComment("用户表");
            builder.Property(x => x.UserNo).IsRequired().HasMaxLength(50).HasComment("账户");
            builder.Property(x => x.UserName).IsRequired().HasMaxLength(50).HasComment("账户名称");
            builder.Property(x => x.Enabled).IsRequired().HasComment("是否启用");
            builder.Property(x => x.Password).IsRequired().HasMaxLength(50).HasComment("密码");
            builder.Property(x => x.RoleId).IsRequired().HasComment("角色ID");
        }
    }
}
